#region MIT Licence
/*
 * Copyright (C) 2014 PdfCreative
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 
 * and associated documentation files (the "Software"), to deal in the Software without restriction, 
 * including without limitation the rights to use, copy, modify, merge, publish, distribute, 
 * sublicense, and/or sell copies of the Software, and to permit persons to whom 
 * the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included 
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 
 * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
#endregion

using System;

namespace PdfCreative.Pdf.Writer
{
    /// <summary>
    /// The CustomResourceReference class encapsulates a custom resource. Custom resources are added to a PDF document through the
    /// Writer's CreateCustomResource() method, and are assigned a reference to a PDF object that represents the resource.
    /// This allows the creation and usage of resource types that are not directly supported by the Writer.
    /// It is the client's responsibility to ensure that this object is included in the PDF document stream (through methods such as
    /// OpenObject(), WriteDictionaryEntry() and CloseObject().
    /// </summary>
    [Serializable]
    public class CustomResourceReference : PdfResourceReference
    {
        // Private fields
        // ==============
        #region Private fields
        private string _resourceType;
        #endregion



        // Public properties
        // =================
        #region Public properties
        /// <summary>
        /// Retrieves the object reference for this resource.
        /// </summary>
        public override string ResourceType
        {
            get { return _resourceType; }
        }
        #endregion



        // Public constructor
        // ==================
        #region Public constructor
        /// <summary>
        /// Constructs a new CustomResourceReference instance.
        /// </summary>
        /// <param name="objectRef">Reference to the PDF object that will represent the resource.</param>
        /// <param name="resourceType">The resource type</param>
        /// <param name="identifier">The identifier of the resource</param>
        public CustomResourceReference(PdfObjectReference objectRef, string resourceType, string identifier)
            : base(objectRef, identifier)
        {
            _resourceType = resourceType;
        }
        #endregion

    } // CustomResourceReference class
}
